package com.dtb.trade.dao.mongodb.first;

import com.dtb.trade.entity.mongodb.first.FirstBlock;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * @Author:ChengJian
 * @Description:
 * @Date: Created in 下午3:30 2018/8/15
 */
public interface FirstRepository extends MongoRepository<FirstBlock,String> {

    FirstBlock findBlockByIndex(long index);

    @Query("{'index':{'$gte':?0}}")
    List<FirstBlock> findFirstBlockByIndex(int index);
}
